//
//  SpeakerView.swift
//  onemeetingmac
//
//  Created by 张衡 on 2020/6/16.
//  Copyright © 2020 onemeeting. All rights reserved.
//

import Foundation

class SpeakerView: NSView {
    override init(frame frameRect: NSRect) {
        super.init(frame: frameRect)
        self.setupUI()
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setupUI() {
        
        self.addSubview(slide)
        slide.snp.makeConstraints { (make) in
            make.width.equalToSuperview().offset(-60)
            make.centerX.equalToSuperview()
            make.height.equalTo(20)
            make.top.equalTo(4)
        }
        
        self.addSubview(minVulam)
        minVulam.snp.makeConstraints { (make) in
            make.width.equalTo(20)
            make.height.equalTo(20)
            make.left.equalToSuperview()
            make.centerY.equalTo(slide)
        }
        
        self.addSubview(maxVulam)
        maxVulam.snp.makeConstraints { (make) in
            make.width.equalTo(20)
            make.height.equalTo(20)
            make.right.equalToSuperview()
            make.centerY.equalTo(slide)
        }
    }
    
    lazy var slide: NSSlider = {
        let slide = NSSlider.init(value: 0.3, minValue: 0, maxValue: 1, target: self, action: #selector(slideAction(senber:)))
        return slide
    }()
    
    lazy var minVulam: NSImageView = {
        let imageV = NSImageView.init(image: NSImage.image(name:"NewUI_Settings_Volume_None")!)
        return imageV
    }()
    
    lazy var maxVulam: NSImageView = {
        let imageV = NSImageView.init(image: NSImage.image(name:"NewUI_Settings_Volume_Full")!)
        return imageV
    }()
    
    @objc func slideAction(senber:NSSlider) {
        
    }
    
    
    
}
